class Eventdata {
	
	static belongsTo = [device:Device]
	
	  //geo fence preoccesd	
	  boolean gfp = false;
	
	  String gfpType ="" //speed,dormant, geozoneEnter,geozoneLeave 
	
	  // Fields
	  double latitude;
	  double longitude;
	  double speed;
	  double heading;
	  double altitude;	  
	  
	  String dataSource = "satellite" ;//gprs, satellite	
	  int gpsAge; // fix age (seconds) (time lapse)
	  double horzAccuracy; 	
	  Date dateCreated	
	  // Fields 
	  Date timestamp;	
	  int statusCode=0;	  
	  String address='';
	  
	  //String city;
	  //String stateProvince;
	  //String postalCode;
	  //String country;	

	  
	 //	 ----------------------------------------------------------------------------
		//	 Reserved status codes: [E0-00 through FF-FF]
		//	 Groups:
		//	      0xF0..  - Generic
		//	      0xF1..  - Motion
		//	      0xF2..  - Geofence
		//	      0xF4..  - Digital input/output
		//	      0xF6..  - Sensor input
		//	      0xF7..  - Temperature input
		//	      0xF9..  - OBC/J1708
		//	      0xFD..  - Device status
		//	 ----------------------------------------------------------------------------
	 static constraints = {
		 dataSource(inList:["satellite"])		 
	 }
}
